<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class AddressAddRequest extends BasicRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'realname'		=> 'bail|required|min:2',
			'mobile'		=> 'bail|required|size:11',
            'house_id'      => 'required',
        ];
    }
    
    public function messages()
	{
		return [
			'realname.required'		=> '请填写用户名',
			'realname.min'			=> '用户名最少为2位',
			'mobile.required'		=> '请填写收货人手机号',
			'mobile.size'			=> '请正确填写手机号',
            'house_id.required'     => '请选择房屋'
		];
	}
}
